window.onload = function() {
    var info = getQuery("loginError");
    if (info == "noCustom"){
        $("errorDiv").innerHTML = "请以顾客身份登录";
    }else if (info == "noManager"){
        $("errorDiv").innerHTML = "请以管理员身份登录";
    }else if (info == "noSend"){
        $("errorDiv").innerHTML = "请以送货员身份登录";
    }
}

function land() {
    axios.get("/user/login",{
        params:{
            userName:$("userName").value,
            pwd:$("pwd").value
        }
    }).then(e => {
        if (e.data == "顾客"){
            location.href = "/index.html"
        }else if (e.data == "管理员"){
            location.href = "/manager/orderManager.html"
        }else if (e.data == "送货员"){
            location.href = "/send/send.html"
        }
        else {
            $("errorDiv").innerHTML = "登录失败"
        }
    })
}